1. Field of the Invention
This invention relates in general to computer-implemented database systems, and, in particular, to providing transaction undo without logging.
2. Description of Related Art
Database management systems (DBMSs) are computerized information storage and retrieval systems. Relational database management systems (RDBMSs) are DBMSs that store and retrieve data that is organized as tables. A table consists of rows and columns of data. The rows are formally called tuples. A database will typically have many tables and each table will typically have multiple tuples and multiple columns. The tables are typically stored on direct access storage devices (DASD) such as magnetic or optical disk drives for semi-permanent storage.
The mechanism by which table data is mapped to physical storage on DASD is DBMS-specific. A common mechanism is through assignment of a table to a tablespace, where a tablespace is a named collection of one or more datasets. Each tablespace is physically divided into equal units called pages, and each page contains one or more tuples of data (full or partial) and/or control information.
As data changes or significant events occur, DBMSs commonly record the occurrences on a recovery log. For example, when a change is made to a row, enough information is written on the log to be able to construct the before-update version of the row from its after-update appearance, and vice versa.
Constructing the before-update version of a row from its after-update appearance and the log is referred to as undo processing. It is the basis by which many DBMSs provide transaction atomicity. Consider a transaction which fails after making some updates, but before reaching a point of consistency. By performing undo processing, the updates made by the failed transaction can be backed out to restore data to its previous point of consistency.
Constructing the after-update version of a row from its before-update appearance and the log is referred to as redo processing. It is a basis by which DBMSs that employ write ahead logging can ensure that committed data is not lost upon system failure. Consider a transaction which fails after committing some updates but before the committed data is written to non-volatile media. By performing redo processing during restart of the system, the missing updates are restored and commit semantics preserved.
Redo processing is also the basis by which many DBMSs provide media recovery. Databases are generally stored on non-volatile data storage devices. Although non-volatile, the media is still vulnerable to damage. Damage to the media is usually referred to as media failure, and restoration of data after media failure is usually referred to as media recovery. A common method of providing media recovery relies on the user periodically making copies of the database onto non-volatile storage and registering those copies with the DBMS. Upon suffering a media failure, the DBMS provides media recovery by installing a copy of the database and performing redo log apply processing against the copy.
To improve transaction performance and reduce log volume, users have expressed a willingness to forego data recoverability and persistence across failure for their less valuable data. Backout capability, however, is still desired. This concession removes from a DBMS the need to perform redo logging for the pertinent data objects, but does not remove, under current art, the need for undo logging. To remove the need for undo logging, there is a need in the art for providing transaction undo without logging.